
#ifndef _MEMBER_BXMLDOCUMENT_H_
#define _MEMBER_BXMLDOCUMENT_H_

#include <BXmlDocument>
#include "member_BXmlNode.h"

namespace BWE
{
	class member_BXmlDocument
	{
	public:
		member_BXmlDocument(BXmlDocument* xmldocument);
		~member_BXmlDocument();

		void makeFormat(BXmlNode* node);

		int readTagName(const BString& tagText, BString& name);
		bool overTest(const char* name, BXmlNode* node);

		bool readNode(BXmlNode* node, const BString& xmltext, int& pos);
		void readAttribs(BXmlNode* node, BString& text);

		const XmlFormat* nodeFormat(const BXmlNode* node);
		void writeNode(const BXmlNode* node, BString& xmltext, int tab);

		BXmlDocument*			boss;
		BString					version;
		BString					encoding;
		XmlFormat				format;
		BXmlNodeHolder			root;
	};
}

#endif
